<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<jsp:include page="../header.jsp" />



<form method="get">
<table>
<tr>
<th>ID</th>
<td>
	<input type="number" name="id" />
	</td>
	</tr>
	</table>
</form>

<c:if test="${person eq null }">
	
	Nie wybrano użytkownika

</c:if>
<c:if test="${person != null }">

	<table>
		<form:form commandName="person">
			<tr>
				<th>Imię</th>
				<td><form:input path="name" /></td>
			</tr>
			<tr>
				<th>Nazwisko</th>
				<td><form:input path="surname" /></td>
			</tr>
			<tr>
				<th>Email</th>
				<td><form:input path="email" /></td>
			</tr>
			<tr>
				<th>Hasło</th>
				<td><form:password path="password" /></td>
			</tr>
			<tr>
				<th>Data<br>Urodzenia
				</th>
				<td><form:input path="birthdate" id="datepicker" /></td>
			</tr>
			<tr>
				<th>Miejsce<br>Zamieszkania
				</th>
				<td><form:input path="home" /></td>
			</tr>
			<tr>
				<th>Płeć</th>
				<td><form:radiobutton path="sex" value="Mężczyzna" /> Mężczyzna<br /> <form:radiobutton path="sex" value="Kobieta" /> Kobieta</td>
			</tr>
			<tr>
				<th>Zainteresowania</th>
				<td><form:input path="interest" /></td>
			<tr>
				<th>Uprawnienia</th>
				<td><form:input path="role" /></td>
			</tr>
			<tr><td align="right" rowspan="2"><input type="submit" value="Wyślij" /></td></tr>
		</form:form>
	</table>

</c:if>

<jsp:include page="../footer.jsp" />